﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Demo0524
{
    class Computer
    {
        private string brand;
        private IUSB usb1;
        private IUSB usb2;

        public Computer(string brand)
        {
            this.brand = brand;
        }
        public Computer() { }
        public string Brand { get => brand; set => brand = value; }
        internal IUSB Usb1 { get => usb1; set => usb1 = value; }
        internal IUSB Usb2 { get => usb2; set => usb2 = value; }

        public void Star() 
        {
            Console.WriteLine("{0}正在开机中...",this.brand);
        }
        public void End() 
        {
            Console.WriteLine("{0}正在关机中...", this.brand);
        }
        public void ReadData() 
        {
            usb1.Read();
            usb2.Read();
        }
        public void WriteData()
        {
            usb1.Write();
            usb2.Write();
        }
    }
}
